package com.ruoyi.applet.appletReceivingAddress.mapper;

import com.ruoyi.applet.appletReceivingAddress.domain.AppletReceivingAddress;
import com.ruoyi.applet.entity.ReceivingAddressApplet;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 小程序用户收货地址Mapper接口
 * @author ruoyi
 * @date 2024-12-17
 */
public interface AppletReceivingAddressMapper {
    
    /**
     * 查询小程序用户收货地址
     * @param id 小程序用户收货地址主键
     * @return 小程序用户收货地址
     */
    public AppletReceivingAddress selectAppletReceivingAddressById(Long id);
    
    /**
     * 查询小程序用户收货地址列表
     * @param appletReceivingAddress 小程序用户收货地址
     * @return 小程序用户收货地址集合
     */
    public List<AppletReceivingAddress> selectAppletReceivingAddressList(AppletReceivingAddress appletReceivingAddress);
    
    /**
     * 新增小程序用户收货地址
     * @param appletReceivingAddress 小程序用户收货地址
     * @return 结果
     */
    public int insertAppletReceivingAddress(AppletReceivingAddress appletReceivingAddress);
    
    /**
     * 修改小程序用户收货地址
     * @param appletReceivingAddress 小程序用户收货地址
     * @return 结果
     */
    public int updateAppletReceivingAddress(AppletReceivingAddress appletReceivingAddress);
    
    /**
     * 删除小程序用户收货地址
     * @param id 小程序用户收货地址主键
     * @return 结果
     */
    public int deleteAppletReceivingAddressById(Long id);
    
    /**
     * 批量删除小程序用户收货地址
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAppletReceivingAddressByIds(String[] ids);
    
    
    
    
    /**
     * 修改默认收货地址
     * @param wxUserId 微信用户
     * @return {@link int}
     */
    int updateDefaultByWxUserId(Long wxUserId);
    
    /**
     *  查询小程序用户收货地址列表
     * @param receivingAddressApplet 查询条件
     * @param pageSize 每页数量
     * @param start 当前记录值
     * @return {@link List<AppletReceivingAddress>}
     */
    List<AppletReceivingAddress> selectAppletReceivingAddressListApplet(@Param("receivingAddressApplet") ReceivingAddressApplet receivingAddressApplet, @Param("pageSize") Integer pageSize, @Param("start") int start);
    int selectAppletReceivingAddressCount(@Param("receivingAddressApplet") ReceivingAddressApplet receivingAddressApplet);
}

